package homework_04.home_07;

import java.util.Arrays;

public class HomeWork_07 {
    /*将一个数组中的元素逆序存放。*/
    public static void main(String[] args) {
        int []a={1,2,3,4,5,6,7,8,9};
        a=nixu(a);
        System.out.println(Arrays.toString(a));
    }
    public static int[] nixu(int[]a){
        int []b=new int[9];
        for (int i = 0;i<a.length;i++){
            b[i]=a[a.length-i-1];

        }
        return b;
    }
}
